<!DOCTYPE html>
<html lang="ch">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>

</html>
<script>


    var jin = prompt("请输入消费金额")
    var jia = prompt("请输入优惠金额")
    if (jin > 50 && jia == 2) {
        alert("成功换购百事可乐一瓶");
    }
    if (jin > 100 && jia ==2){
        alert("成功换购百事可乐一瓶");
    }
    if (jin > 100 && jia ==3){
        alert("成功换购500ml可乐一瓶");
    }
    if (jin > 100 && jia ==10){
        alert("成功换购5斤面粉");
    }
    if (jin > 200 && jia ==2){
        alert("成功换购百事可乐一瓶");
    }
    if (jin > 200 && jia ==3){
        alert("成功换购500ml可乐一瓶");
    }
    if (jin > 200 && jia ==10){
        
        alert("成功换购换购5斤面粉或炒菜锅");
    }
    if (jin > 200 && jia ==20){
        alert("成功换购欧莱雅爽肤水一瓶");
    }
</script>